package guitforl.wrappers

import javax.swing.{SwingConstants, JLabel, JPanel, JTextField}

/**
 * @autor Artem Kozlov
 */
class EditWrapper(val caption:String, val name: String, private val defaultValue: String) extends JPanel {

  setLayout(LayoutFactory.createEditWidgetLayout)
  val label = new JLabel(caption, SwingConstants.CENTER)
	add(label)
  val edit = new JTextField(defaultValue)
  add(edit)

  def isEmpty = edit.getText.isEmpty

  def getText = edit.getText
}